<!--用户提示说明-->
<div class="padded-container container-flush">
    <div class="callout fade in callout-info no-icon no-subheader">
        <button type="button" class="close" data-request="onHideBackendHint" data-request-data="name: 'system_eventlogs_hint'" data-dismiss="callout" aria-hidden="true">×</button>
        <div class="content">
            <p>
                下标虚线字段是可点击修改的可变参数
            </p>
        </div>
    </div>
</div>
<!--币种管理-->
<div class="form-group span-left">
    <label>币种管理</label>
    <table class="table data">
        <thead>
            <tr>
                <th class="">
                    <a>币种</a>
                </th>
                <?php foreach ($currencies as $currency): ?>
                <th class="">
                    <p class="help-block">
                        <a class="text-edit editable editable-click" href="#" data-type="text" data-title="" data-table="summer_hjd_currency" data-pk="<?= $currency->id ?>" data-name="title"><?= $currency->title ?></a>
                    </p>
                </th>
                <?php endforeach ?>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td >
                    <a>价格</a>
                </td>
                <?php foreach ($currencies as $currency): ?>
                <td>
                    <p class="help-block">
                        <a class="text-edit editable editable-click" href="#" data-type="text" data-title="" data-table="summer_hjd_currency" data-pk="<?= $currency->id ?>" data-name="price"><?= $currency->price ?></a>
                    </p>
                </td>
                <?php endforeach ?>
            </tr>
        </tbody>
    </table>
</div>
<!--奖金规则-->
<?php if ($rules): ?>
    <?php foreach ($rules as $rule): ?>
    <div class="form-group span-left">
        <label><?= $rule->title ?></label>

        <?php if ($rule->slug == 'yijia'): ?>
        <p class="help-block">
            公司统一溢价
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_value"><?= $rule->rule_value ?></a>
            %
        </p>
        <?php endif ?>
        <?php if ($rule->slug == 'shangjia_fee'): ?>
        <p class="help-block">
            上架费
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_value"><?= $rule->rule_value ?></a>
            %
        </p>
        <?php endif ?>
        <?php if ($rule->slug == 'heart'): ?>
        <p class="help-block">
            爱心购
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_value"><?= $rule->rule_value ?></a>
            %
        </p>
        <?php endif ?>

        <?php if ($rule->slug == 'pay_ratio'): ?>
            <p class="help-block">
                现金支付比例
                <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_value"><?= $rule->rule_value ?></a>
                %,积分支付比例
                <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_a"><?= $rule->rule_a ?></a>
                %，【此处两制合为100】
            </p>
        <?php endif ?>

        <?php if ($rule->slug == 'tuijian'): ?>
        <p class="help-block">
            直推奖励
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_value"><?= $rule->rule_value ?></a>
            %,间推奖励
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_a"><?= $rule->rule_a ?></a>
            %
        </p>
        <?php endif ?>

        <?php if ($rule->slug == 'chaifen'): ?>
        <p class="help-block">
            上午场拆分金额
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_value"><?= $rule->rule_value ?></a>
            ，下午场拆分金额
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_a"><?= $rule->rule_a ?></a>
           。【上架后，达到该值拆分】
        </p>
        <?php endif ?>

        <?php if ($rule->slug == 'jicha1'): ?>
        <p class="help-block">
            享受日流水
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_value"><?= $rule->rule_value ?></a>
            ‰，条件：团队日流水达
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_a"><?= $rule->rule_a ?></a>
            。
        </p>
        <?php endif ?>
        <?php if ($rule->slug == 'jicha2'): ?>
        <p class="help-block">
            享受日流水
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_value"><?= $rule->rule_value ?></a>
            ‰，条件：团队日流水达
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_a"><?= $rule->rule_a ?></a>
            ,培养<?= $rule->rule_b ?>个部门达体验店。
        </p>
        <?php endif ?>
        <?php if ($rule->slug == 'jicha3'): ?>
        <p class="help-block">
            享受日流水
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_value"><?= $rule->rule_value ?></a>
            ‰，条件：团队日流水达
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_a"><?= $rule->rule_a ?></a>
            ,培养<?= $rule->rule_b ?>个部门达标准店。
        </p>
        <?php endif ?>
        <?php if ($rule->slug == 'jicha4'): ?>
        <p class="help-block">
            享受日流水
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_value"><?= $rule->rule_value ?></a>
            ‰，条件：团队日流水达
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_a"><?= $rule->rule_a ?></a>
            ,培养<?= $rule->rule_b ?>个部门达豪华店。
        </p>
        <?php endif ?>
        <?php if ($rule->slug == 'jiaquan'): ?>
        <p class="help-block">
            所有旗舰店长分红
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_value"><?= $rule->rule_value ?></a>
            ‰，
        </p>
        <?php endif ?>

        <?php if ($rule->slug == 'day_can'): ?>
        <p class="help-block">
            上午场限制
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_value"><?= $rule->rule_value ?></a>
            单，下午场限制
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_a"><?= $rule->rule_a ?></a>
            单。
        </p>
        <?php endif ?>
        <?php if ($rule->slug == 'order_check'): ?>
        <p class="help-block">
            抢购后
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_a"><?= $rule->rule_a ?></a>
            小时不支付，扣
            <a class="text-edit editable editable-click" href="#" data-type="text" data-pk="<?= $rule->id ?>" data-name="rule_value"><?= $rule->rule_value ?></a>
            积分，商品积分不足部分扣除招商积分
        </p>
        <?php endif ?>

        <?php if ($rule->has_status == 1): ?>
        <label class="custom-switch switch">
            <input type="checkbox" data-table="summer_hjd_bonus_rule" data-id="<?= $rule->id ?>" data-field="status" <?php echo $rule->status==1 ? 'checked="checked"' : '';  ?> >
            <span>
                    <span>开</span>
                    <span>关</span>
                </span>
            <a class="slide-button"></a>
        </label>
        <?php endif ?>
    </div>
    <?php endforeach ?>
<?php else: ?>
    <li class="no-data">暂未配置信息</li>
<?php endif ?>
